//
//  DMConverstaionModel.h
//  HDMainWindow
//
//  Created by apple on 2017/5/6.
//  Copyright © 2017年 com.devin.definesys. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "DMMessageBaseModel.h"

typedef NS_ENUM(NSInteger, LLMessageListUpdateType) {
    kLLMessageListUpdateTypeLoadMore = 0,
    kLLMessageListUpdateTypeLoadMoreComplete,
    kLLMessageListUpdateTypeNewMessage
};

typedef NS_ENUM(NSInteger, LLConversationType) {
    kLLConversationTypeChat = 0,
    kLLConversationTypeGroupChat = 1,
    kLLConversationTypeChatRoom = 2
};

@interface DMConverstaionModel : NSObject

//以下三个属性SDK不存储,需要由服务器提供,此处采用假数据
@property (nonatomic) NSString *avatarImageURL;
@property (nonatomic) UIImage *avatarImage;
@property (nonatomic) NSString *nickName;

@property (nonatomic) NSTimeInterval latestMessageTimestamp;

@property (nonatomic) NSInteger unreadMessageNumber;
@property (nonatomic) NSString *conversationId;

@property (nonatomic) LLConversationType conversationType;

@property (nonatomic) DMMessageBaseModel *referenceMessageModel;
@property (nonatomic) LLMessageListUpdateType updateType;

//该Conversation已经获取到的消息数组，按照时间从过去到现在排序，最近的消息在数组最后面
@property (atomic) NSMutableArray<DMMessageBaseModel *> *allMessageModels;

@property (nonatomic) NSString *draft;

@end
